﻿using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace StoreWeb.system.order
{
    public partial class edit : System.Web.UI.Page
    {
        Maticsoft.BLL.Orders bll = new Maticsoft.BLL.Orders();
        Maticsoft.BLL.Ordertetisize ordertetisizebll = new Maticsoft.BLL.Ordertetisize();
        protected string clnvCName = "", cinvstd = "", size = "", tetisizes = "", size2 = "", cinvstd2 = "", istz = "0", mobile = "";
        protected Maticsoft.Model.Orders md = new Maticsoft.Model.Orders();
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                hidid.Value = Request["id"];
                md = bll.GetModel(Convert.ToInt32(hidid.Value));
                hdclnvCNames.Value = md.cInvCNames;
                cinvstd = md.cinvstd;
                hidcInvCName.Value = md.cInvCName;
                txtnote.Value = md.note;
                mobile = md.membermobile;
                size = md.size;
                hdsize2.Value = md.sizebackup;
                hdcinvstd2.Value = md.cinvstdbackup;
                hdcinvstd.Value = md.cinvstd;
                //hidistz.Value = md.istz;
                hdistz.Value= md.istz;
                hdsize.Value = md.size;
                hdmobile.Value = md.membermobile;
                hidordercode.Value = md.code;
                hidcInvCCode.Value = md.cInvCCode;
                tetisizes = JsonConvert.SerializeObject(ordertetisizebll.GetModelList("ordercode='" + md.code + "'"));
            }
        }
    }
}